clear all
**NB check this package automating controls
help synth_runner
*also effect_graphs, pval_graphs, single_treatment_graphs


use "What if data.dta"

*DESCRIPTIVE STATISTICS  ---------------------------------

sum if Country!="Italy"
sum if Country=="Italy"

* [DECLARE DATA AS PANEL  ---------------------------------]

egen Ncountry = group(Country)
xtset Ncountry Time

// check that the panel is balanced and that the timevar is correctly set 
xtset 


*Figure 3
synth_runner emprate emprate(2009(1)2014) emprate(2004(1)2008) gdp growth deficit debt compensation productivity tertiary, trunit(15) trperiod(2015) nested allopt gen_vars


*Figure 4
synth_runner temporary temporary(2009(1)2014) temporary(2004(1)2008) gdp growth deficit debt compensation productivity tertiary, trunit(15) trperiod(2015) nested allopt gen_vars

synth_runner youngrate youngrate(2009(1)2014) youngrate(2004(1)2008) gdp growth deficit debt compensation productivity tertiary, trunit(15) trperiod(2015) nested allopt gen_vars

synth_runner womenrate womenrate(2009(1)2014) womenrate(2004(1)2008) gdp growth deficit debt compensation productivity tertiary, trunit(15) trperiod(2015) nested allopt gen_vars

*After analyses: plots
single_treatment_graphs, trlinediff(-1) effects_ylabels(-10(5)10) effects_ymax(10) effects_ymin(-10)
effect_graphs, trlinediff(-1)
pval_graphs


**Appendix

*Figure A.7
synth_runner tempyoung tempyoung(2009(1)2014) tempyoung(2004(1)2008) gdp growth deficit debt compensation productivity tertiary, trunit(15) trperiod(2015) nested allopt gen_vars

*Figure A.9
synth_runner y15_39 y15_39(2009(1)2014) y15_39(2004(1)2008) gdp growth deficit debt compensation productivity tertiary, trunit(15) trperiod(2015) nested allopt gen_vars


